﻿using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Xml.Linq;
using Shattered_Windows.OSVersioning;
using Shattered_Windows.PostOp;

namespace Shattered_Windows
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    /// 

    // First off we need to remove all this logic from the code behind because this is going to be a limiting factor
    // for our code re-use in the future. And that is a no-no: Don't repeat yourself, re-use.

    public partial class MainWindow : Window
    {
        
       
        public MainWindow()
        {
            InitializeComponent();

            BindableOperatingSystem BindableOS = new BindableOperatingSystem();
            textStatus.Text = BindableOS.OsVersionLabel + " " + BindableOS.OsPlatformLabel + " " + BindableOS.OsServicePackLabel;
            
            
             
        }

        private void Grid_Loaded(object sender, RoutedEventArgs e)
        {

        }

        private void checkPostOp_Checked(object sender, RoutedEventArgs e)
        {
            checkTemp.IsChecked = true;
            checkTime.IsChecked = true;
        }

        private void checkPostOp_Unchecked(object sender, RoutedEventArgs e)
        {
            checkTemp.IsChecked = false;
            checkTime.IsChecked = false;
        }

        private void buttonRunSelected_Click(object sender, RoutedEventArgs e)
        {
            TempCleaner TempCleaner = new TempCleaner();
            TempCleaner.RunCleanup();
            statusBar.Value = 100;
        }
    }
}
